using System;
using System.Reflection;
using System.Windows.Forms;

namespace KexpScrobbler
{
    public partial class OptionsForm : Form
    {
        public OptionsForm()
        {
            InitializeComponent();

            versionLabel.Text = Assembly.GetExecutingAssembly().GetName().Version.ToString();

            usernameTextBox.Text = ConfigurationSingleton.Username;
            passwordTextBox.Text = ConfigurationSingleton.Password;
            showBallonTipsCheckBox.Checked = ConfigurationSingleton.Balloon;
        }

        private void okButton_Click(object sender, EventArgs e)
        {
            ConfigurationSingleton.Username = usernameTextBox.Text;
            ConfigurationSingleton.Password = passwordTextBox.Text;
            ConfigurationSingleton.Balloon = showBallonTipsCheckBox.Checked;

            ConfigurationSingleton.Save();
        }
    }
}